<?php
	$mold = $_REQUEST['mold'];
	
	$con = mysqli_connect('localhost','root','','chongqinghuoguo110');
	
	mysqli_set_charset($con, 'utf8');
	if($mold==1){
		$sql = "select * from food";
	}else{
		$sql = "select * from food where mold='{$mold}'";
	};
	
	$result = mysqli_query($con,$sql);
	$arr = mysqli_fetch_all($result,MYSQLI_ASSOC);
	$str = json_encode($arr);
	echo $str;
//print_r($arr);
	mysqli_close($con);
	
?>	